package com.ktjiaoyu.crm;
import com.ktjiaoyu.crm.mapper.UserMapper;
import com.ktjiaoyu.crm.pojo.User;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
public class UserMapperTestr {
    @Autowired
    private UserMapper userMapper;
    @Test
    public void test(){
        userMapper.insert(new User("ct","123456",9L,1));
    }
    @Test
    public void test2(){
        User user=userMapper.get(4L);
        System.out.println("usrName"+user.getUsrName());
    }

    @Test
    public void testDelete() {
        userMapper.delete(84L);
    }

    @Test
    public void testUpdate() {
        User userToUpdate = new User();
        userToUpdate.setUsrId(6L);
        userToUpdate.setUsrName("updatedName");
        userMapper.update(userToUpdate);
    }
}
